import { CreatePermActionDto, UpdatePermActionDto } from '@ai/entity';
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common';
import { PermActionService } from './perm-action.service';

@Controller('perm-action')
export class PermActionController {
    constructor(private readonly permActionService: PermActionService) {}

    @Post()
    create(@Body() createPermActionDto: CreatePermActionDto) {
        return this.permActionService.create(createPermActionDto);
    }

    @Get('list')
    findAll() {
        return this.permActionService.findAll();
    }

    @Get(':id')
    findOne(@Param('id') id: string) {
        return this.permActionService.findOne(id);
    }

    @Patch(':id')
    update(@Param('id') id: string, @Body() updatePermActionDto: UpdatePermActionDto) {
        return this.permActionService.update(id, updatePermActionDto);
    }

    @Delete(':id')
    remove(@Param('id') id: string) {
        return this.permActionService.remove(id);
    }
}
